package com.open4cn.simulator.core.connector.serialport;

/**
 * @author yinxiaopeng
 * @version 1.0.0
 * @company 致景科技
 * @department 飞梭BU/研发
 * @description
 * @Email yinxiaopeng@zj.tech
 * @date 2022-06-11 18:53
 */
public abstract class ByteToMessageDecoder extends SerialPortInboundHandlerAdapter {

    protected abstract void decode(SerialPortHandlerContext ctx, Object msg);

    @Override
    public void serialPortRead(SerialPortHandlerContext ctx, Object msg) {
        decode(ctx, msg);
    }
}
